USE [RD_DWCR]
GO

/****** Object:  Table [dbo].[JDEARCMbyLineofBusines]    Script Date: 03/25/2010 14:21:34 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[JDEARCMbyLineofBusines](
	[SourceID] [int] NOT NULL,
	[Source] [char](20) NOT NULL,
	[AddressNumber] [int] NOT NULL,
	[CompanyNumber] [char](5) NOT NULL,
	[ARClass] [char](4) NOT NULL,
	[ARDefaultBU] [char](12) NOT NULL,
	[ARDefaultObject] [char](6) NOT NULL,
	[ARDefaultSubsidiary] [char](8) NOT NULL,
	[ARModelDocumentCo] [char](5) NOT NULL,
	[ARModelJEDocument] [int] NOT NULL,
	[ARModelJEDocumentType] [char](2) NOT NULL,
	[CurrencyCode] [char](3) NOT NULL,
	[TaxRateArea] [char](10) NOT NULL,
	[TaxExplanationCode] [char](2) NOT NULL,
	[CreditLimit] [decimal](15, 0) NOT NULL,
	[HoldInvoices] [char](1) NOT NULL,
	[PaymentTerms] [char](3) NOT NULL,
	[SendStatementTo] [char](1) NOT NULL,
	[PaymentInstrument] [char](1) NOT NULL,
	[PrintStatements] [char](1) NOT NULL,
	[AlternatePayer] [int] NOT NULL,
	[AutoCash] [char](1) NOT NULL,
	[SendInvoiceTo] [char](1) NOT NULL,
	[LedgerInquirySequence] [char](1) NOT NULL,
	[AutoCashAlgorithm] [char](2) NOT NULL,
	[StatementCycle] [char](2) NOT NULL,
	[BalanceForwardOpenItem] [char](1) NOT NULL,
	[TemporaryCreditMessage] [char](2) NOT NULL,
	[CreditCheckHandlingCode] [char](1) NOT NULL,
	[DateOfLastCreditReview] [datetime] NOT NULL,
	[DelinquencyNotice] [char](1) NOT NULL,
	[LastReviewedBy] [char](10) NOT NULL,
	[RecallForReviewByDate] [datetime] NOT NULL,
	[DaysSalesOutstanding] [int] NOT NULL,
	[CreditManager] [char](10) NOT NULL,
	[CollectionManager] [char](10) NOT NULL,
	[NoOfDunningLettersSent] [int] NOT NULL,
	[LastDunningLetterDate] [datetime] NOT NULL,
	[NumberOfRemindersToSend] [char](1) NOT NULL,
	[CollectionReport] [char](1) NOT NULL,
	[NumberOfSentReminders01] [int] NOT NULL,
	[NumberOfSentReminders02] [int] NOT NULL,
	[NumberOfSentReminders03] [int] NOT NULL,
	[NumberOfInvoicesToCollection] [int] NOT NULL,
	[ApplyFinanceCharges] [char](1) NOT NULL,
	[ApplyFinanceChargeDays] [int] NOT NULL,
	[PercentageFactor] [decimal](20, 7) NOT NULL,
	[CreateFinanceChargeEntries] [char](1) NOT NULL,
	[MiscCode02] [char](1) NOT NULL,
	[LastStatementDate] [datetime] NOT NULL,
	[DateOfFirstInvoice] [datetime] NOT NULL,
	[LastInvoiceDate] [datetime] NOT NULL,
	[ABCCodeSales] [char](1) NOT NULL,
	[ABCCodeMargin] [char](1) NOT NULL,
	[ABCCodeAverageDays] [char](1) NOT NULL,
	[FinancialStatementsOnHand] [datetime] NOT NULL,
	[DateLastPaid] [datetime] NOT NULL,
	[DunnAndBradstreetRating] [char](3) NOT NULL,
	[DunnAndBradstreetDate] [datetime] NOT NULL,
	[TRWRating] [char](3) NOT NULL,
	[TRWDate] [datetime] NOT NULL,
	[AverageDaysToPay] [int] NOT NULL,
	[CurrencyCodeABAmounts] [char](3) NOT NULL,
	[AmountDue] [decimal](20, 7) NOT NULL,
	[PriorYearFinanceCharges] [decimal](20, 7) NOT NULL,
	[YTDFinanceCharges] [decimal](20, 7) NOT NULL,
	[AmountInvoicedThisYear] [decimal](20, 7) NOT NULL,
	[AmountInvoicedPriorYear] [decimal](20, 7) NOT NULL,
	[HighBalance] [decimal](20, 7) NOT NULL,
	[LastPaidAmount] [decimal](20, 7) NOT NULL,
	[AddressBookAmount] [decimal](20, 7) NOT NULL,
	[AddressBookAmount01] [decimal](20, 7) NOT NULL,
	[AmountOpenOrder] [decimal](20, 7) NOT NULL,
	[MaximumOrderValue] [decimal](20, 7) NOT NULL,
	[MinimumOrderValue] [decimal](20, 7) NOT NULL,
	[YTDOrders] [int] NOT NULL,
	[PriorYearOrders] [int] NOT NULL,
	[PersonOpeningAccount] [char](10) NOT NULL,
	[DateAccountOpened] [datetime] NOT NULL,
	[RelatedAddressNumber] [int] NOT NULL,
	[BillingAddressType] [char](1) NOT NULL,
	[CustomerPricingRule] [char](8) NOT NULL,
	[OrderTemplate] [char](8) NOT NULL,
	[TradeDiscount] [decimal](20, 7) NOT NULL,
	[PrintMessage] [char](10) NOT NULL,
	[ExemptFromCreditHold] [char](1) NOT NULL,
	[HoldOrdersCode] [char](2) NOT NULL,
	[RouteCode] [char](3) NOT NULL,
	[StopCode] [char](3) NOT NULL,
	[ZoneNumber] [char](3) NOT NULL,
	[PreferredCarrierSales] [int] NOT NULL,
	[DeliveryInstructions01] [char](30) NOT NULL,
	[DeliveryInstructions02] [char](30) NOT NULL,
	[LeadTimeTransitDays] [int] NOT NULL,
	[FreightHandlingCode] [char](3) NOT NULL,
	[ApplyFreightYN] [char](1) NOT NULL,
	[PartialShipmentsAllowed] [char](1) NOT NULL,
	[SubstitutesAllowed] [char](1) NOT NULL,
	[BackOrdersAllowed] [char](1) NOT NULL,
	[CustomerPORequired] [char](1) NOT NULL,
	[PriorityProcessingCode] [char](1) NOT NULL,
	[ARCreditCheckLevel] [char](1) NOT NULL,
	[InvoiceCopies] [int] NOT NULL,
	[InvoiceConsolidation] [char](1) NOT NULL,
	[BillingFrequency] [char](1) NOT NULL,
	[NextInvoiceDate] [datetime] NOT NULL,
	[LicenseExpirationDate] [datetime] NOT NULL,
	[PricePickList] [char](1) NOT NULL,
	[MergeOrders] [char](1) NOT NULL,
	[CommissionCode01] [int] NOT NULL,
	[CommissionRate1] [decimal](20, 7) NOT NULL,
	[CommissionCode02] [int] NOT NULL,
	[CommissionRate2] [decimal](20, 7) NOT NULL,
	[PalletControl] [char](1) NOT NULL,
	[VolumeDisplayedUOM] [char](2) NOT NULL,
	[WeightDisplayedUOM] [char](2) NOT NULL,
	[BatchProcessingMode] [char](1) NOT NULL,
	[ItemTypeIdentifier] [char](1) NOT NULL,
	[CustomerTypeIdentifier] [char](1) NOT NULL,
	[QuantityDecimals] [int] NOT NULL,
	[AmountDecimals] [int] NOT NULL,
	[FutureUse01] [char](1) NOT NULL,
	[FutureUse02] [char](1) NOT NULL,
	[PartialOrderShipmentsAllowed] [char](1) NOT NULL,
	[SpecialInstructions02] [char](1) NOT NULL,
	[SpecialInstructions03] [char](1) NOT NULL,
	[SpecialInstructions04] [char](1) NOT NULL,
	[SpecialInstructions05] [char](1) NOT NULL,
	[UserReservedCode] [char](2) NOT NULL,
	[UserReservedAmount] [decimal](20, 7) NOT NULL,
	[UserReservedNumber] [int] NOT NULL,
	[UserReservedDate] [datetime] NOT NULL,
	[UserReservedReference] [char](15) NOT NULL,
	[ReportCodes] [char](1) NOT NULL,
	[AdjustmentSchedule] [char](8) NOT NULL,
	[AdjustmentsOnInvoice] [char](1) NOT NULL,
	[SendMethod] [char](1) NOT NULL,
	[PolicyNumberInternal] [int] NOT NULL,
	[DeductionManager] [int] NOT NULL,
	[AutoReceiptsExecutionList] [char](10) NOT NULL,
	[AdministrationCreditLimit] [decimal](15, 0) NOT NULL,
	[Category01Code] [char](3) NOT NULL,
	[Category01] [char](30) NOT NULL,
	[Category02Code] [char](3) NOT NULL,
	[Category02] [char](30) NOT NULL,
	[Category03Code] [char](3) NOT NULL,
	[Category03] [char](30) NOT NULL,
	[Category04Code] [char](3) NOT NULL,
	[Category04] [char](30) NOT NULL,
	[Category05Code] [char](3) NOT NULL,
	[Category05] [char](30) NOT NULL,
	[Category06Code] [char](3) NOT NULL,
	[Category06] [char](30) NOT NULL,
	[Category07Code] [char](3) NOT NULL,
	[Category07] [char](30) NOT NULL,
	[Category08Code] [char](3) NOT NULL,
	[Category08] [char](30) NOT NULL,
	[Category09Code] [char](3) NOT NULL,
	[Category09] [char](30) NOT NULL,
	[Category10Code] [char](3) NOT NULL,
	[Category10] [char](30) NOT NULL,
	[Category11Code] [char](3) NOT NULL,
	[Category11] [char](30) NOT NULL,
	[Category12Code] [char](3) NOT NULL,
	[Category12] [char](30) NOT NULL,
	[Category13Code] [char](3) NOT NULL,
	[Category13] [char](30) NOT NULL,
	[Category14Code] [char](3) NOT NULL,
	[Category14] [char](30) NOT NULL,
	[Category15Code] [char](3) NOT NULL,
	[Category15] [char](30) NOT NULL,
	[Category16Code] [char](3) NOT NULL,
	[Category16] [char](30) NOT NULL,
	[Category17Code] [char](3) NOT NULL,
	[Category17] [char](30) NOT NULL,
	[Category18Code] [char](3) NOT NULL,
	[Category18] [char](30) NOT NULL,
	[Category19Code] [char](3) NOT NULL,
	[Category19] [char](30) NOT NULL,
	[Category20Code] [char](3) NOT NULL,
	[Category20] [char](30) NOT NULL,
	[Category21Code] [char](3) NOT NULL,
	[Category21] [char](30) NOT NULL,
	[Category22Code] [char](3) NOT NULL,
	[Category22] [char](30) NOT NULL,
	[Category23Code] [char](3) NOT NULL,
	[Category23] [char](30) NOT NULL,
	[Category24Code] [char](3) NOT NULL,
	[Category24] [char](30) NOT NULL,
	[Category25Code] [char](3) NOT NULL,
	[Category25] [char](30) NOT NULL,
	[Category26Code] [char](3) NOT NULL,
	[Category26] [char](30) NOT NULL,
	[Category27Code] [char](3) NOT NULL,
	[Category27] [char](30) NOT NULL,
	[Category28Code] [char](3) NOT NULL,
	[Category28] [char](30) NOT NULL,
	[Category29Code] [char](3) NOT NULL,
	[Category29] [char](30) NOT NULL,
	[Category30Code] [char](3) NOT NULL,
	[Category30] [char](30) NOT NULL,
	[ProgramNameShippingLabels] [char](10) NOT NULL,
	[VersionNameShipLabelProgram] [char](10) NOT NULL,
	[ConfigurationPickandPack] [char](18) NOT NULL,
	[ConfigurationStandCartonPack] [char](18) NOT NULL,
	[DefaultConfiguration] [char](1) NOT NULL,
	[RequiresPackagingCode] [char](1) NOT NULL,
	[RequiresWeightCode] [char](1) NOT NULL,
	[DefaultIdentificationCodeQual1] [char](2) NOT NULL,
	[DefaultIdentificationCodeQual2] [char](2) NOT NULL,
	[RequiresIdentificationCode1] [char](1) NOT NULL,
	[RequiresIdentificationCode2] [char](1) NOT NULL,
	[RequiresTransportationMethod] [char](1) NOT NULL,
	[RequiresRouting] [char](1) NOT NULL,
	[RequiresEquipment] [char](1) NOT NULL,
	[RequiresReferenceNumber1] [char](1) NOT NULL,
	[DefaultReferenceNumQualifier1] [char](2) NOT NULL,
	[DefaultIdentificationCodeQual] [char](2) NOT NULL,
	[RequiresReferenceNumber2] [char](1) NOT NULL,
	[UserID] [char](10) NOT NULL,
	[ProgramID] [char](10) NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[LastTimeUpdated] [int] NOT NULL,
	[WorkStationID] [char](10) NOT NULL,
	[PurgeFlag] [char](1) NOT NULL,
	[PreferenceSchedule] [char](8) NOT NULL,
	[OPBusinessObjective] [char](30) NOT NULL,
	[AllowShippingOfHeldLots] [char](1) NOT NULL,
	[BuyingSegmentCode] [char](10) NOT NULL,
	[BypassAuditLogging] [char](30) NOT NULL,
	[APSBusinessUnit] [char](1) NOT NULL,
	[Tier] [char](5) NOT NULL,
	[PayWhenPaidCashReceiptThresh] [int] NOT NULL,
	[CustomerStatus] [char](1) NOT NULL,
	[OverrideSalesTeamAssignment] [char](1) NOT NULL,
	[TerritoryID] [int] NOT NULL,
	[IndustryGroup] [int] NOT NULL,
	[TransactionOriginator] [char](10) NOT NULL,
	[DateEntered] [datetime] NOT NULL,
	[SynchronizationStatus] [int] NOT NULL,
	[ServerStatus] [int] NOT NULL,
	[InsertIndicator] [int] NOT NULL,
	[InsertDate] [datetime] NOT NULL,
	[ChangeIndicator] [int] NOT NULL,
	[ChangeDate] [datetime] NOT NULL,
	[DeleteIndicator] [int] NOT NULL,
	[DeleteDate] [datetime] NOT NULL,
	[PurgeDate] [datetime] NOT NULL,
 CONSTRAINT [PK_JDEARCustomerMasterbyLineofBusiness] PRIMARY KEY CLUSTERED 
(
	[AddressNumber] ASC,
	[CompanyNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


